package com.hanthink.system.mapper.repair;

import java.util.List;
import java.util.Map;

import com.hanthink.system.domain.repair.RepairRecordFileVo;
import com.hanthink.system.domain.repair.RepairRecordInfo;
import org.apache.ibatis.annotations.Param;

public interface RepairRecoedMapper {

	/**
	 * 插入维修记录信息
	 * 
	 * @param list 维修记录集合
	 * @return
	 */
    int insertPairRecord(List<RepairRecordInfo> list);

	/**
	 * 根据报修单ID查询维修信息
	 * 
	 * @param list 维修记录集合
	 * @return
	 */
    List<RepairRecordInfo> SelectRecordByRequestKey(Map<String, Object> params);

	/**
	 * 查询当前待维修单据
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectWaitRepairList(Map<String, Object> params);

	List<RepairRecordInfo> selectWaitRepairListbycode(Map<String, String> params);


	List<RepairRecordInfo> selectWaitRepairListsj(Map<String, Object> params);
	/**
	 * 查询当前待审核单据
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectWaitCheckList(Map<String, Object> params);

	List<RepairRecordInfo> selectWaitCheckListRole(@Param("site") String site, @Param("deptid") String deptid,@Param("username") String username);

	List<RepairRecordInfo> selectWaitCheckListRoleqx(@Param("site") String site, @Param("deptid") String deptid,@Param("username") String username);
	List<RepairRecordInfo> selectWaitCheckListRoleqx1(@Param("site") String site, @Param("deptid") String deptid,@Param("username") String username);
	List<RepairRecordInfo> selectWaitCheckListRoleqx2(@Param("site") String site, @Param("deptid") String deptid,@Param("username") String username);

	/**
	 * 查询当前设备条码是否存在
	 * 
	 * @param params
	 * @return
	 */
    String queryEquipName(String equipName);

	/**
	 * 根据ID更新维修单状态
	 * 
	 * @param params
	 * @return
	 */
    void updateRepairStatus(Map<String, Object> params);

	void updateRepairStatussj(Map<String, Object> params);

	void updateRepairStatussj1(Map<String, Object> params);

	int updateRepairStatusplus(Map<String, Object> params);

	/**
	 * 根据ID更新维修单执行人
	 * 
	 * @param params
	 * @return
	 */
    void updateRepairUser(Map<String, Object> params);

	/**
	 * 根据ID查询维修单
	 * 
	 * @param params
	 * @return
	 */
    RepairRecordInfo selectRecordById(Long id);

	RepairRecordInfo selectRecordByIdplus(Long id);

	/**
	 * 根据报修单ID查询维修单信息
	 * 
	 * @param params
	 * @return
	 */
    List<RepairRecordInfo> selectRepairByRequestId(RepairRecordInfo repairRecordInfo);

	List<RepairRecordInfo> selectRepairByRequestOverTime();

	void updateRepairByRequestOverTime(@Param("id") Long id);
	/**
	 * 保存维修单文件信息
	 * 
	 * @param params
	 * @return
	 */
	int saveRepairRecoedFileInfo(List<RepairRecordFileVo> resourceList);

	/**
	 * 根据报修单查询维修单信息
	 * 
	 * @param id 报修单ID
	 * @return
	 */
	RepairRecordInfo selectRecordByRecordId(String id);

}
